Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Refactor, update, create documentation #1371

Merged
merged 5 commits into from
Dec 21, 2015

Conversation

bf4
Copy link
Member

@bf4 bf4 commented Dec 10, 2015

I did a lot of re-organizing, included deduplication of content.

I also wrote some new docs.

There are likely bugs:

  • spelling
  • doesn't make sense
  • broken link
  • missing link
  • out of place

Please help review!

  • Click view on any of the files in the the diff to see how they render
  • Or just start from the rendered readme or the guides

Note to self, https://github.com/rails-api/active_model_serializers/blob/0-8-stable/DESIGN.textile is neat. It's not in the commit history since 0.10 starts from it's own root node.

- [![API Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://www.rubydoc.info/github/rails-api/active_model_serializers)
- [Guides](https://github.com/rails-api/active_model_serializers/tree/master/docs)
- [0.9 Documentation](https://github.com/rails-api/active_model_serializers/tree/0-9-stable)
- [0.8 Documentation](https://github.com/rails-api/active_model_serializers/tree/0-8-stable)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bf4
Copy link
Member Author

bf4 commented Dec 14, 2015

ref: caching #1372

@bf4 bf4 force-pushed the documentation_updates branch 17 times, most recently from c3c72d5 to 1b2324b Compare December 14, 2015 18:13
@bf4
Copy link
Member Author

bf4 commented Dec 14, 2015

@rails-api/ams thoughts? I think this is a big improvement to the docs in general, but am afraid I might have missed something


```ruby
ActiveModel::Serializer.config.adapter = :json_api
render @posts, include: 'author.comments.**'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is not render json: @posts, include: 'author.comments.**'?

@bf4 bf4 force-pushed the documentation_updates branch from 23d558e to 9c3431d Compare December 16, 2015 03:34
@duduribeiro
Copy link

👏


It's the default adapter, it generates a json response without a root key.
Doesn't follow any specific convention.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re: #1371 (comment)

It just said

#### Attributes

It's the default adapter, it generates a json response without a root key.
Doesn't follow any specific convention.

Thanks @duduribeiro

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


## Rails Integration

AMS will automatically integrate with you Rails app, you won't need to update your controller, this is a example of how it will look like:
ActiveModelSerializers will automatically integrate with you Rails app, you won't need to update your controller, this is a example of how it will look like:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ActiveModelSerializers will automatically integrate with your Rails app, so you won't need to update your controller. This is an example of how it could look:

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍻

@NullVoxPopuli
Copy link
Contributor

I think I might be good with this. I only noticed the one grammar error.

Nice work, @bf4 !

@bf4
Copy link
Member Author

bf4 commented Dec 16, 2015

@duduribeiro @NullVoxPopuli any thoughts about file names or where things should go?

  • general vs. howto
  • general/rendering vs. general/getting_starting vs. readme vs. docs/readme
  • general/adapters vs. general/serializers vs. general/caching vs. general/rendering vs. howto?
  • logging/instrumentation in general/howto
  • general/config as its own file and how it's referenced by other pages.
  • root readme vs. docs/readme vs. other pages

@NullVoxPopuli
Copy link
Contributor

I think general should have information on things about AMS, rather than usage (what I think howto would be good for)

@bf4
Copy link
Member Author

bf4 commented Dec 17, 2015

More details please :). Ref by file name and topic/contents is good.

B mobile phone

On Dec 16, 2015, at 5:51 PM, L. Preston Sego III [email protected] wrote:

I think general should have information on things about AMS, rather than usage (what I think howto would be good for)


Reply to this email directly or view it on GitHub.

@bf4
Copy link
Member Author

bf4 commented Dec 21, 2015

@NullVoxPopuli #1371 (comment)

I'm going to merge this since it'll make everyone's work in ongoing pr's easier if it's already in master, and mine as well, if I have to diff various PRs with new documentation, and it seems like the parts we're uncertain about can be addressed as we use it.

@NullVoxPopuli
Copy link
Contributor

sounds good, @bf4

bf4 added a commit that referenced this pull request Dec 21, 2015
[DOCS] Refactor, update, create documentation
@bf4 bf4 merged commit fce856f into rails-api:master Dec 21, 2015
@bf4 bf4 deleted the documentation_updates branch December 21, 2015 04:30
@bf4
Copy link
Member Author

bf4 commented Dec 21, 2015

Let's hope this helps and doesn't cause too much difficulty on the part of PR creators...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants